<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>投诉</title>
    <!--<link rel="stylesheet" href="../css/common.css">-->
    <!--<link rel="stylesheet" href="../css/page.css">-->
    <link rel="stylesheet" href="../css/base.css">
    <link rel="stylesheet" href="../css/page.css">
    <script src="../js/jquery-3.2.1.min.js"></script>
    <script src="../js/public.js"></script>

    <!--<script src="../js/media.js"></script>-->
    <script src="../js/common.js"></script>
</head>
<body>
<div class="public-header flex" style="line-height: .88rem;text-align: right;padding-right: .2rem;background: #5f3104;color: ">
    <!--<span class="public-header-left-search"></span>-->
    <span class="public-header-left-back"></span>
    <span class="public-header-center"></span>
    <span class="public-header-right" style="color: #fff;" id="fb_btn">发布</span>
</div>
<div>
    <textarea name="" id="txt_main" cols="30" rows="10" placeholder="请填写内容" style="border: none;width:100%;font-size:12px;padding: 5px 10px;box-sizing: border-box;"></textarea>
</div>
<script>
    $(function (){
        $("#fb_btn").click(function (){
             if(isNull($("#txt_main").val())){
                 alert("请填写内容");
                 return false;
             }
             $.ajax({
                 url:base_url+"ZITAOHUI/addComplaint",
                 data:{
                     produceId:GetQueryString("id"),
                     reason:$("#txt_main").val(),
                     uid:sessionStorage.getItem("uid")

                 },
                 dataType:"json",
                 success:function (data){
                        if(data.code == 1){
                            alert("投诉成功");
                            window.history.back();
                        }
                 },
                error:function(data){

                }
             })
        });
    })
</script>
</body>
</html>